Crate fastanvil[−][src]
Expand description
For handling Minecraft’s region format, Anvil.
anvil::Region
can be given a Read
and Seek
type eg a file in order to extract chunk data.
Modules
Structs
A block within the world.
The location of chunk data within a Region file.
Encodes how the NBT-Data is compressed
Dimension provides a cache on top of a RegionLoader.
Various heightmaps kept up to date by Minecraft.
A Minecraft chunk.
A level describes the contents of the chunk in the world.
PackedBits can be used in place of blockstates in chunks to avoid
allocating memory for them when they might not be needed. This object by
default just retains a reference to the data in the input, and unpack_into
can be used to get the unpacked version when needed.
A Minecraft Region. Allows access to chunk data, handling decompression.
A vertical section of a chunk (ie a 16x16x16 block cube)
Enums
Various compression schemes that NBT data is typically compressed with.
Constants
the size of the region file header.
the size in bytes of a ‘sector’ in a region file. Sectors are Minecraft’s size unit
for chunks. For example, a chunk might be 3 * SECTOR_SIZE
bytes.
Traits
Palette can be used to take a block description to produce a colour that it should render to.
RegionLoader implmentations provide access to regions. They do not need to be concerned with caching, just providing an object that implements Region.
Functions
Get the number of bits that will be used in Blockstates
per block.
Expand blockstate data so each block is an element of a Vec
.
Expand generic bit-packed data in the 1.15 format, ie data potentially existing across two 64-bit ints.
Expand generic bit-packed data in the 1.16 format, ie with padding bits.
Expand heightmap data. This is equivalent to expand_generic(data, 9)
.